<%- layout('backend/layout/default') %>
    <div class="page" id="Page">
        <div class="page-header">
            <ol class="breadcrumb">
                <li><a href="/backend">首页</a></li>
                <li><a href="/backend/members">客户信息</a></li>
                <li class="active"><a href="#">编辑客户信息</a></li>
            </ol>
            <h2>编辑客户信息</h2>
        </div>
        <div class="page-content">
            <div class="content-container">
                <form class="validform form-horizontal" action="/backend/member/<%= member.id %>" method="put" 
                data-operation="ajax" data-success-mode="alert" data-error-mode="alert">
                    <div class="form-group">
                        <label class="col-lg-1 control-label">姓名</label>
                        <div class="col-lg-6">
                            <input class="form-control" name="name" type="text" 
                            placeholder="姓名" validate-rules="required" value="<%= member.name %>">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-1 control-label">性别</label>
                        <div class="col-lg-6">
                            <select class="form-control" name="sex">
                                <option value="">保密</option>
                                <option value="male" <%= member.sex == "male"?'selected':'' %> >男</option>
                                <option value="female" <%= member.sex == "female"?'selected':'' %> >女</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-1 control-label">联系电话</label>
                        <div class="col-lg-6">
                            <input class="form-control" name="phone" type="text" 
                            placeholder="联系电话" validate-rules="required phone" value="<%= member.phone %>">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-1 control-label">联系邮箱</label>
                        <div class="col-lg-6">
                            <input class="form-control" name="email" type="text" 
                            placeholder="联系邮箱" validate-rules="email" value="<%= member.email %>">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-1 control-label">出生日期</label>
                        <div class="col-lg-6">
                            <input class="datepicker form-control" name="birthday" type="datetime" 
                            placeholder="出生日前" readonly="" value="<%= member.birthday %>">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-1 control-label">地址</label>
                        <div class="col-lg-6">
                            <input class="form-control" name="address" type="text" 
                            placeholder="地址" validate-rules="required" value="<%= member.address %>">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-1 control-label">备注</label>
                        <div class="col-lg-6">
                            <textarea class="form-control" name="remark" placeholder="备注"><%= member.remark %></textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-lg-6 col-lg-offset-1">
                            <button type="reset" class="btn btn-default">重置</button>
                            <button type="submit" class="btn btn-primary">保存</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>